/*
 * This file is part of GuitarMaster.
 * 
 * GuitarMaster is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * GuitarMaster is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with GuitarMaster.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.paris5.master2.guitarmaster.exception;

/*
 * $Id: EcomQueryException.java 8 2013-03-13 08:38:14Z nedjahi.mourad@gmail.com $
 * 
 * $HeadURL: http://com-paris5-master2-guitarmaster-distrib.googlecode.com/svn/trunk/com.paris5.master2.guitarmaster.distrib/src/com/paris5/master2/guitarmaster/exception/EcomQueryException.java $
 * $Revision: 8 $
 * $Date: 2013-03-13 08:38:14 +0000 (Wed, 13 Mar 2013) $
 * $Author: nedjahi.mourad@gmail.com $
 */

/**
 * @author Leticia Mahamed, Alice Khammy, mourad nedjahi, Saliou Mamadou Barry
 * 
 * Exception requete invalide
 */
public class EcomQueryException extends EcomException{
    
    private String query;
    
    public EcomQueryException(){
        super();
    }
    
    public EcomQueryException(String query) {
        super();
        this.query = query;
    }
    
    public EcomQueryException(String query, String message) {
        super(null, message);
        this.query = query;
    }
    
    public EcomQueryException(String query, String message, Object obj, Level level) {
        super(obj, message, level);
        this.query = query;
    }

    public void setQuery(String query) {
        this.query = query;
    }

    public String getQuery() {
        return query;
    }
    
    @Override
    public String toString()
    {
        StringBuilder stb = new StringBuilder();
        stb.append(super.toString());
        stb.append("Content(").append(super.getObject()).append(")");
        return stb.toString();
    }
}
